package drink;

import java.util.Scanner;

/**
 * @Auther: xiaofei
 * @Date: 2021/6/8 - 06 - 08 - 10:18
 * @Description: drink
 * @version: 1.0
 */
public class DrinkStore {
    public static Drink getDrink(int choice){
        Scanner sc = new Scanner(System.in);
        Drink drink = null;
        System.out.println("是否加冰：");
        String isIce = sc.next();
        System.out.println("选择：1.中杯 2.大杯 3.超大杯");
        int size = sc.nextInt();
        System.out.println("选择饮品数量：");
        int num = sc.nextInt();
        switch(choice){
            case 1:
            {
                double price = 10;
                System.out.println("备注可口可乐还是百事可乐");
                String remark = sc.next();
                Cola cola = new Cola("可乐",price,size,isIce,num,remark);
                drink = cola;
            }break;
            case 2:
            {
                double price = 15;
                System.out.println("备注加糖、加奶、什么都不加");
                String remark = sc.next();
                Coffee coffee = new Coffee("咖啡",price,size,isIce,num,remark);
                drink = coffee;
            }break;
            case 3:
            {
                double price = 12;
                System.out.println("备注是否加入椰果、红豆、布丁");
                String remark = sc.next();
                MikyTea mikyTea = new MikyTea("奶茶",price,size,isIce,num,remark);
                drink = mikyTea;
            }break;
        }
        return drink;
    }
}
